<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Use Options</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Use Options' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../inform7n.html">Inform7</a></li><li><a href="index.html">runtime</a></li><li><a href="index.html#3">Chapter 3: Basics</a></li><li><b>Use Options</b></li></ul></div>
<p class="purpose">To give use options a presence at run-time.</p>

<ul class="toc"><li><a href="3-uo.html#SP6">&#167;6. Deprecated inclusion notation</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>The following function compiles everything necessary for use options to
work at runtime:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">use_option_compilation_data</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">package_request</span><span class="plain-syntax"> *</span><span class="identifier-syntax">uo_package</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">uo_value</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">value_to_use</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">value_determined_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">use_option_compilation_data</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">use_option_compilation_data</span><span class="plain-syntax"> </span><span class="function-syntax">RTUseOptions::new_compilation_data</span><span class="plain-syntax">(</span><span class="identifier-syntax">use_option</span><span class="plain-syntax"> *</span><span class="identifier-syntax">uo</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">use_option_compilation_data</span><span class="plain-syntax"> </span><span class="identifier-syntax">uocd</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">uocd</span><span class="plain-syntax">.</span><span class="element-syntax">uo_package</span><span class="plain-syntax"> = </span><a href="2-hrr.html#SP19" class="function-link"><span class="function-syntax">Hierarchy::local_package_to</span></a><span class="plain-syntax">(</span><span class="constant-syntax">USE_OPTIONS_HAP</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">where_created</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">uocd</span><span class="plain-syntax">.</span><span class="element-syntax">uo_value</span><span class="plain-syntax"> = </span><a href="2-hrr.html#SP12" class="function-link"><span class="function-syntax">Hierarchy::make_iname_in</span></a><span class="plain-syntax">(</span><span class="constant-syntax">USE_OPTION_ID_HL</span><span class="plain-syntax">, </span><span class="identifier-syntax">uocd</span><span class="plain-syntax">.</span><span class="element-syntax">uo_package</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">uocd</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">uocd</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">uocd</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="function-syntax">RTUseOptions::uo_iname</span><span class="plain-syntax">(</span><span class="identifier-syntax">use_option</span><span class="plain-syntax"> *</span><span class="identifier-syntax">uo</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">uo_value</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">RTUseOptions::compile</span><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_1" class="named-paragraph-link"><span class="named-paragraph">Reject inline definitions if we forbid deprecated features</span><span class="named-paragraph-number">1.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_2" class="named-paragraph-link"><span class="named-paragraph">Calculate the values of configuration constants</span><span class="named-paragraph-number">1.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_3" class="named-paragraph-link"><span class="named-paragraph">Apply Inter metadata</span><span class="named-paragraph-number">1.3</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_4" class="named-paragraph-link"><span class="named-paragraph">Compile pragmas from use options which set these</span><span class="named-paragraph-number">1.4</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_5" class="named-paragraph-link"><span class="named-paragraph">Compile configuration values supplied by the compiler itself</span><span class="named-paragraph-number">1.5</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_6" class="named-paragraph-link"><span class="named-paragraph">Compile configuration values supplied by use options</span><span class="named-paragraph-number">1.6</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<ul class="endnotetexts"><li>The structure use_option_compilation_data is private to this section.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_1" class="paragraph-anchor"></a><b>&#167;1.1. </b>This is only done here in the runtime module as a convenience of timing.
The potential issue is that by the time "Use no deprecated features" is read,
we have already read all the offending inline definitions.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Reject inline definitions if we forbid deprecated features</span><span class="named-paragraph-number">1.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">global_compilation_settings</span><span class="plain-syntax">.</span><span class="identifier-syntax">no_deprecated_features</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">use_option</span><span class="plain-syntax"> *</span><span class="identifier-syntax">uo</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">, </span><span class="identifier-syntax">use_option</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">definition_form</span><span class="plain-syntax"> == </span><span class="identifier-syntax">INLINE_UTAS</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">where_created</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">StandardProblems::handmade_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">Task::syntax_tree</span><span class="plain-syntax">(),</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_UONotationDeprecated</span><span class="plain-syntax">));</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Problems::quote_source</span><span class="plain-syntax">(1, </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Problems::issue_problem_segment</span><span class="plain-syntax">(</span>
<span class="plain-syntax">                    </span><span class="string-syntax">"In %1, you set up a use option, but you use the deprecated notation "</span>
<span class="plain-syntax">                    </span><span class="string-syntax">"'(- ... -)' to say what to do if this option is set. Since you "</span>
<span class="plain-syntax">                    </span><span class="string-syntax">"also have 'Use no deprecated features' set, I'm issuing a problem "</span>
<span class="plain-syntax">                    </span><span class="string-syntax">"message. (For now, though, this would have worked if it hadn't been "</span>
<span class="plain-syntax">                    </span><span class="string-syntax">"for 'Use no deprecated features'.)"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Problems::issue_problem_end</span><span class="plain-syntax">();</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2" class="paragraph-anchor"></a><b>&#167;1.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Calculate the values of configuration constants</span><span class="named-paragraph-number">1.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">use_option</span><span class="plain-syntax"> *</span><span class="identifier-syntax">uo</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">, </span><span class="identifier-syntax">use_option</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_2_1" class="named-paragraph-link"><span class="named-paragraph">Calculate the value to use</span><span class="named-paragraph-number">1.2.1</span></a></span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_1" class="paragraph-anchor"></a><b>&#167;1.2.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Calculate the value to use</span><span class="named-paragraph-number">1.2.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">definition_form</span><span class="plain-syntax"> == </span><span class="identifier-syntax">CONFIG_FLAG_UTAS</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">definition_form</span><span class="plain-syntax"> == </span><span class="identifier-syntax">CONFIG_FLAG_IN_UTAS</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">definition_form</span><span class="plain-syntax"> == </span><span class="identifier-syntax">COMPILER_UTAS</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-uo.html#SP4" class="function-link"><span class="function-syntax">RTUseOptions::used</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">parsed_use_option_setting</span><span class="plain-syntax"> *</span><span class="identifier-syntax">puos</span><span class="plain-syntax"> =</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">FIRST_IN_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">parsed_use_option_setting</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">settings_made</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">puos</span><span class="plain-syntax">) </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">made_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">default_value</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">made_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">default_value</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">made_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">explicits</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">default_value</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">made_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">parsed_use_option_setting</span><span class="plain-syntax"> *</span><span class="identifier-syntax">puos</span><span class="plain-syntax">, *</span><span class="identifier-syntax">explicit</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, *</span><span class="identifier-syntax">minimum_puos</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">minimum</span><span class="plain-syntax"> = -1;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">default_value</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">at_least</span><span class="plain-syntax"> == </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">minimum</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">default_value</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">value</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">minimum_puos</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">default_value</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"Default for %W: "</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-uo.html#SP5" class="function-link"><span class="function-syntax">RTUseOptions::log_puos</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">default_value</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"\n"</span><span class="plain-syntax">);</span>

<span class="plain-syntax">        </span><span class="identifier-syntax">LOOP_OVER_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">puos</span><span class="plain-syntax">, </span><span class="identifier-syntax">parsed_use_option_setting</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">settings_made</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"Setting: "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-uo.html#SP5" class="function-link"><span class="function-syntax">RTUseOptions::log_puos</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">puos</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"\n"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">at_least</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">explicits</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">explicits</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax">) </span><span class="identifier-syntax">explicit</span><span class="plain-syntax"> = </span><span class="identifier-syntax">puos</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">value</span><span class="plain-syntax"> != </span><span class="identifier-syntax">explicit</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">value</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_2_1_1" class="named-paragraph-link"><span class="named-paragraph">Issue problem for value conflict</span><span class="named-paragraph-number">1.2.1.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">            } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">at_least</span><span class="plain-syntax"> == </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">minimum</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">value</span><span class="plain-syntax">) { </span><span class="identifier-syntax">minimum</span><span class="plain-syntax"> = </span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">value</span><span class="plain-syntax">; </span><span class="identifier-syntax">minimum_puos</span><span class="plain-syntax"> = </span><span class="identifier-syntax">puos</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">explicit</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">minimum_puos</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">minimum</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">explicit</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">value</span><span class="plain-syntax">) </span><span class="identifier-syntax">minimum</span><span class="plain-syntax"> = </span><span class="identifier-syntax">explicit</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">value</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">minimum</span><span class="plain-syntax"> &gt; </span><span class="identifier-syntax">explicit</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">value</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax"> = </span><span class="identifier-syntax">minimum_puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">made_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Problems::quote_source</span><span class="plain-syntax">(1, </span><span class="identifier-syntax">minimum_puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">made_at</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Problems::quote_source</span><span class="plain-syntax">(2, </span><span class="identifier-syntax">explicit</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">made_at</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Problems::quote_wording</span><span class="plain-syntax">(3, </span><span class="identifier-syntax">minimum_puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">textual_option</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">StandardProblems::handmade_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">Task::syntax_tree</span><span class="plain-syntax">(),</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_UOExplicitValueTooSmall</span><span class="plain-syntax">));</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Problems::issue_problem_segment</span><span class="plain-syntax">(</span>
<span class="plain-syntax">                    </span><span class="string-syntax">"In %1, you set a use option '%3', but that conflicts with the "</span>
<span class="plain-syntax">                    </span><span class="string-syntax">"earlier setting %2."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">Problems::issue_problem_end</span><span class="plain-syntax">();</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">minimum</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax"> = </span><span class="identifier-syntax">minimum</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">minimum_puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">made_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">explicit</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax"> = </span><span class="identifier-syntax">explicit</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">value</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">explicit</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">made_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">default_value</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">value</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">default_value</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">made_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"Determined value of %W = %d\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">name</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1_2">&#167;1.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_1_1" class="paragraph-anchor"></a><b>&#167;1.2.1.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Issue problem for value conflict</span><span class="named-paragraph-number">1.2.1.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax"> = </span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">made_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Problems::quote_source</span><span class="plain-syntax">(1, </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Problems::quote_source</span><span class="plain-syntax">(2, </span><span class="identifier-syntax">explicit</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">made_at</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Problems::quote_wording</span><span class="plain-syntax">(3, </span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">textual_option</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">StandardProblems::handmade_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">Task::syntax_tree</span><span class="plain-syntax">(), </span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_UOValueConflicts</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Problems::issue_problem_segment</span><span class="plain-syntax">(</span>
<span class="plain-syntax">        </span><span class="string-syntax">"In %1, you set a use option '%3', but that conflicts with the "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"earlier setting %2."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Problems::issue_problem_end</span><span class="plain-syntax">();</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1_2_1">&#167;1.2.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_3" class="paragraph-anchor"></a><b>&#167;1.3. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Apply Inter metadata</span><span class="named-paragraph-number">1.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">use_option</span><span class="plain-syntax"> *</span><span class="identifier-syntax">uo</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">, </span><span class="identifier-syntax">use_option</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">package_request</span><span class="plain-syntax"> *</span><span class="identifier-syntax">R</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">uo_package</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">set_iname</span><span class="plain-syntax"> = </span><a href="2-hrr.html#SP12" class="function-link"><span class="function-syntax">Hierarchy::make_iname_in</span></a><span class="plain-syntax">(</span><span class="constant-syntax">USE_OPTION_ON_MD_HL</span><span class="plain-syntax">, </span><span class="identifier-syntax">R</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">set</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-uo.html#SP4" class="function-link"><span class="function-syntax">RTUseOptions::used</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">)) </span><span class="identifier-syntax">set</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><a href="2-emt.html#SP6" class="function-link"><span class="function-syntax">Emit::numeric_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">set_iname</span><span class="plain-syntax">, </span><span class="identifier-syntax">set</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="2-emt.html#SP6" class="function-link"><span class="function-syntax">Emit::numeric_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">uo_value</span><span class="plain-syntax">, (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="2-hrr.html#SP23" class="function-link"><span class="function-syntax">Hierarchy::apply_metadata_from_raw_wording</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">R</span><span class="plain-syntax">, </span><span class="constant-syntax">USE_OPTION_MD_HL</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">N</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">N</span><span class="plain-syntax">, </span><span class="string-syntax">"%W option"</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="2-hrr.html#SP23" class="function-link"><span class="function-syntax">Hierarchy::apply_metadata</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">R</span><span class="plain-syntax">, </span><span class="constant-syntax">USE_OPTION_PNAME_MD_HL</span><span class="plain-syntax">, </span><span class="identifier-syntax">N</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">N</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><a href="2-hrr.html#SP23" class="function-link"><span class="function-syntax">Hierarchy::apply_metadata_from_number</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">R</span><span class="plain-syntax">, </span><span class="constant-syntax">SOURCE_FILE_SCOPED_MD_HL</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">source_file_scoped</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><a href="2-hrr.html#SP23" class="function-link"><span class="function-syntax">Hierarchy::apply_metadata_from_number</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">R</span><span class="plain-syntax">, </span><span class="constant-syntax">USE_OPTION_USED_AT_MD_HL</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) </span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">Node::get_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax">)));</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">source_file</span><span class="plain-syntax"> *</span><span class="identifier-syntax">sf</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax">)?</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">Lexer::file_of_origin</span><span class="plain-syntax">(</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">Node::get_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax">)))):</span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inform_extension</span><span class="plain-syntax"> *</span><span class="identifier-syntax">efo</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">sf</span><span class="plain-syntax">)?(</span><span class="identifier-syntax">Extensions::corresponding_to</span><span class="plain-syntax">(</span><span class="identifier-syntax">sf</span><span class="plain-syntax">)):</span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">sf</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">efo</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><a href="2-hrr.html#SP23" class="function-link"><span class="function-syntax">Hierarchy::apply_metadata_from_number</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">R</span><span class="plain-syntax">, </span><span class="constant-syntax">USED_IN_SOURCE_TEXT_MD_HL</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">sf</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><a href="2-hrr.html#SP23" class="function-link"><span class="function-syntax">Hierarchy::apply_metadata_from_number</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">R</span><span class="plain-syntax">, </span><span class="constant-syntax">USED_IN_OPTIONS_MD_HL</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">efo</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><a href="2-hrr.html#SP23" class="function-link"><span class="function-syntax">Hierarchy::apply_metadata_from_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">R</span><span class="plain-syntax">, </span><span class="constant-syntax">USED_IN_EXTENSION_MD_HL</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                </span><a href="2-cu.html#SP5" class="function-link"><span class="function-syntax">CompilationUnits::extension_id</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">efo</span><span class="plain-syntax">));</span>
<span class="plain-syntax">        </span><a href="2-hrr.html#SP23" class="function-link"><span class="function-syntax">Hierarchy::apply_metadata_from_number</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">R</span><span class="plain-syntax">, </span><span class="constant-syntax">USE_OPTION_CV_MD_HL</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_4" class="paragraph-anchor"></a><b>&#167;1.4. </b>Some use options convert directly into pragma instructions telling the Inform 6
compiler (assuming we will be using that) to raise some limit. This is done with
ICL ("Inform Control Language") instructions: see the Inform 6 Designer's Manual
for details of these. Any other code-generator can ignore these pragmas.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Compile pragmas from use options which set these</span><span class="named-paragraph-number">1.4</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">target_pragma_setting</span><span class="plain-syntax"> *</span><span class="identifier-syntax">tps</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">tps</span><span class="plain-syntax">, </span><span class="identifier-syntax">target_pragma_setting</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><a href="2-emt.html#SP5" class="function-link"><span class="function-syntax">Emit::pragma</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">tps</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">target</span><span class="plain-syntax">, </span><span class="identifier-syntax">tps</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">content</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">i6_memory_setting</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ms</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">ms</span><span class="plain-syntax">, </span><span class="identifier-syntax">i6_memory_setting</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">TargetVMs::allow_memory_setting</span><span class="plain-syntax">(</span><span class="identifier-syntax">Task::vm</span><span class="plain-syntax">(), </span><span class="identifier-syntax">ms</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">ICL_identifier</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">prag</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">prag</span><span class="plain-syntax">, </span><span class="string-syntax">"$%S=%d"</span><span class="plain-syntax">, </span><span class="identifier-syntax">ms</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">ICL_identifier</span><span class="plain-syntax">, </span><span class="identifier-syntax">ms</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">number</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="2-emt.html#SP5" class="function-link"><span class="function-syntax">Emit::pragma</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"Inform6"</span><span class="plain-syntax">, </span><span class="identifier-syntax">prag</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">prag</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">TargetVMs::is_16_bit</span><span class="plain-syntax">(</span><span class="identifier-syntax">Task::vm</span><span class="plain-syntax">()) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">prag</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">prag</span><span class="plain-syntax">, </span><span class="string-syntax">"$DICT_WORD_SIZE=%d"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">global_compilation_settings</span><span class="plain-syntax">.</span><span class="identifier-syntax">dictionary_resolution</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="2-emt.html#SP5" class="function-link"><span class="function-syntax">Emit::pragma</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"Inform6"</span><span class="plain-syntax">, </span><span class="identifier-syntax">prag</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">prag</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_5" class="paragraph-anchor"></a><b>&#167;1.5. </b>A few kit configuration values cannot be set with use options, and are
hard-wired into the compiler:
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Compile configuration values supplied by the compiler itself</span><span class="named-paragraph-number">1.5</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">global_compilation_settings</span><span class="plain-syntax">.</span><span class="identifier-syntax">no_verb_verb_exists</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-uo.html#SP3" class="function-link"><span class="function-syntax">RTUseOptions::define_config_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"WorldModelKit`NO_VERB_VERB_EXISTS"</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><a href="3-uo.html#SP3" class="function-link"><span class="function-syntax">RTUseOptions::define_config_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"WorldModelKit`NO_VERB_VERB_EXISTS"</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="6-bd.html#SP3" class="function-link"><span class="function-syntax">RTBibliographicData::story_author_given</span></a><span class="plain-syntax">()) {</span>
<span class="plain-syntax">        </span><a href="3-uo.html#SP3" class="function-link"><span class="function-syntax">RTUseOptions::define_config_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"WorldModelKit`STORY_AUTHOR_GIVEN"</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><a href="3-uo.html#SP3" class="function-link"><span class="function-syntax">RTUseOptions::define_config_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"WorldModelKit`STORY_AUTHOR_GIVEN"</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">global_compilation_settings</span><span class="plain-syntax">.</span><span class="identifier-syntax">ranking_table_given</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="3-uo.html#SP3" class="function-link"><span class="function-syntax">RTUseOptions::define_config_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"WorldModelKit`RANKING_TABLE_GIVEN"</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><a href="3-uo.html#SP3" class="function-link"><span class="function-syntax">RTUseOptions::define_config_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"WorldModelKit`RANKING_TABLE_GIVEN"</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_6" class="paragraph-anchor"></a><b>&#167;1.6. </b>There's a little dance here to make sure that every flag or value referred to
in a use option declaration is actually compiled (to a default value if necessary),
but once only. This can be difficult to ensure since multiple use options may
set the same value (probably, but not necessarily, differently). We use a
dictionary of the symbol names being declared to keep track.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Compile configuration values supplied by use options</span><span class="named-paragraph-number">1.6</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">dictionary</span><span class="plain-syntax"> *</span><span class="identifier-syntax">D</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Dictionaries::new</span><span class="plain-syntax">(32, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"Active use options (those set by explicit sentences)\n"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">use_option</span><span class="plain-syntax"> *</span><span class="identifier-syntax">uo</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">, </span><span class="identifier-syntax">use_option</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><a href="3-uo.html#SP4" class="function-link"><span class="function-syntax">RTUseOptions::used</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">)) &amp;&amp; (</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">no_Inter_presence</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"use option '%W': "</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">active</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">definition_form</span><span class="plain-syntax"> == </span><span class="identifier-syntax">INLINE_UTAS</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_6_1" class="named-paragraph-link"><span class="named-paragraph">Include raw Inform 6 code</span><span class="named-paragraph-number">1.6.1</span></a></span>
<span class="plain-syntax">            </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_6_2" class="named-paragraph-link"><span class="named-paragraph">Define a symbol</span><span class="named-paragraph-number">1.6.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"\nInactive use options (those not set by explicit sentences)\n"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER</span><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">, </span><span class="identifier-syntax">use_option</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><a href="3-uo.html#SP4" class="function-link"><span class="function-syntax">RTUseOptions::used</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">no_Inter_presence</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"use option '%W': "</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">active</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">definition_form</span><span class="plain-syntax"> == </span><span class="identifier-syntax">INLINE_UTAS</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_6_1" class="named-paragraph-link"><span class="named-paragraph">Include raw Inform 6 code</span><span class="named-paragraph-number">1.6.1</span></a></span>
<span class="plain-syntax">            </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_6_2" class="named-paragraph-link"><span class="named-paragraph">Define a symbol</span><span class="named-paragraph-number">1.6.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"\n"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_6_3" class="named-paragraph-link"><span class="named-paragraph">Default any configuration constants needed by a kit but not addressed by use options</span><span class="named-paragraph-number">1.6.3</span></a></span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_6_1" class="paragraph-anchor"></a><b>&#167;1.6.1. </b>The old-school way for use options to take effect is by causing a constant to
be defined using inclusion notation. That is, they are defined using Inform 6
notation inside <span class="extract"><span class="extract-syntax">(-</span></span> and <span class="extract"><span class="extract-syntax">-)</span></span> markers: for example,
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">Use</span><span class="plain-syntax"> </span><span class="identifier-syntax">feverish</span><span class="plain-syntax"> </span><span class="identifier-syntax">dreams</span><span class="plain-syntax"> </span><span class="identifier-syntax">translates</span><span class="plain-syntax"> </span><span class="identifier-syntax">as</span><span class="plain-syntax"> (- </span><span class="identifier-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">FEVERISH_DREAMS</span><span class="plain-syntax">; -).</span>
<span class="identifier-syntax">Use</span><span class="plain-syntax"> </span><span class="identifier-syntax">hallucination</span><span class="plain-syntax"> </span><span class="identifier-syntax">time</span><span class="plain-syntax"> </span><span class="identifier-syntax">of</span><span class="plain-syntax"> </span><span class="identifier-syntax">at</span><span class="plain-syntax"> </span><span class="identifier-syntax">least</span><span class="plain-syntax"> </span><span class="constant-syntax">1024</span><span class="plain-syntax"> </span><span class="identifier-syntax">translates</span><span class="plain-syntax"> </span><span class="identifier-syntax">as</span>
<span class="plain-syntax">    (- </span><span class="identifier-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">DREAMY_TIME</span><span class="plain-syntax"> = {</span><span class="identifier-syntax">N</span><span class="plain-syntax">}+3; -).</span>
</pre>
<p class="commentary">The <span class="extract"><span class="extract-syntax">{N}</span></span> marker, if present, is converted to the value, producing, say:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">DREAMY_TIME</span><span class="plain-syntax"> = </span><span class="constant-syntax">4096</span><span class="plain-syntax">+3;</span>
</pre>
<p class="commentary">All this form of notation is deprecated now, but in the mean time we can still
read almost all such definitions, because almost all users write them in a simple
enough way that we can tell what they want and achieve it by better means.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Include raw Inform 6 code</span><span class="named-paragraph-number">1.6.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">UO</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::new</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="string-syntax">"%W"</span><span class="plain-syntax">, </span><span class="identifier-syntax">Wordings::from</span><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">expansion</span><span class="plain-syntax">, </span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">expansion</span><span class="plain-syntax">) + </span><span class="constant-syntax">1</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">where_created</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="3-uo.html#SP6" class="function-link"><span class="function-syntax">RTUseOptions::handle_deprecated_definition</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">active</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1_6">&#167;1.6</a> (twice).</li></ul>
<p class="commentary firstcommentary"><a id="SP1_6_2" class="paragraph-anchor"></a><b>&#167;1.6.2. </b>The newer and better way does not involve inclusions (with their concomitant
need to inject splat nodes into the Inter we generate), but instead makes
constants which will be linked into the kit of code we are trying to configure.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Define a symbol</span><span class="named-paragraph-number">1.6.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">val</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">kit_name</span><span class="plain-syntax">) &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_6_2_3" class="named-paragraph-link"><span class="named-paragraph">Vet the kit</span><span class="named-paragraph-number">1.6.2.3</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">UO</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::new</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_6_2_1" class="named-paragraph-link"><span class="named-paragraph">Compose the full symbol name UO</span><span class="named-paragraph-number">1.6.2.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">dict_entry</span><span class="plain-syntax"> *</span><span class="identifier-syntax">de</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Dictionaries::find</span><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">use_option</span><span class="plain-syntax"> *</span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">de</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">use_option</span><span class="plain-syntax"> *) </span><span class="identifier-syntax">Dictionaries::value_for_entry</span><span class="plain-syntax">(</span><span class="identifier-syntax">de</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><a href="3-uo.html#SP4" class="function-link"><span class="function-syntax">RTUseOptions::used</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">)) &amp;&amp; (</span><a href="3-uo.html#SP4" class="function-link"><span class="function-syntax">RTUseOptions::used</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">at</span><span class="plain-syntax">)) &amp;&amp;</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax"> != </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP1_6_2_2" class="named-paragraph-link"><span class="named-paragraph">Issue a problem for mutually exclusive options being set</span><span class="named-paragraph-number">1.6.2.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"doing nothing as %S already set to %d\n"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"defining %S = %d\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">val</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Dictionaries::create</span><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Dictionaries::write_value</span><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-uo.html#SP3" class="function-link"><span class="function-syntax">RTUseOptions::define_config_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">val</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1_6">&#167;1.6</a> (twice).</li></ul>
<p class="commentary firstcommentary"><a id="SP1_6_2_1" class="paragraph-anchor"></a><b>&#167;1.6.2.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Compose the full symbol name UO</span><span class="named-paragraph-number">1.6.2.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">definition_form</span><span class="plain-syntax"> == </span><span class="identifier-syntax">CONFIG_FLAG_UTAS</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">definition_form</span><span class="plain-syntax"> == </span><span class="identifier-syntax">CONFIG_FLAG_IN_UTAS</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><a href="3-uo.html#SP2" class="function-link"><span class="function-syntax">RTUseOptions::uo_identifier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">kit_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">symbol_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><a href="3-uo.html#SP2" class="function-link"><span class="function-syntax">RTUseOptions::uo_identifier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">kit_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">symbol_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1_6_2">&#167;1.6.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_6_2_2" class="paragraph-anchor"></a><b>&#167;1.6.2.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Issue a problem for mutually exclusive options being set</span><span class="named-paragraph-number">1.6.2.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"would set %S = %d but it's already %d\n"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">val</span><span class="plain-syntax">, </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_to_use</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax"> = </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Problems::quote_source</span><span class="plain-syntax">(1, </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Problems::quote_source</span><span class="plain-syntax">(2, </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">compilation_data</span><span class="plain-syntax">.</span><span class="element-syntax">value_determined_at</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Problems::quote_wording</span><span class="plain-syntax">(3, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Problems::quote_wording</span><span class="plain-syntax">(4, </span><span class="identifier-syntax">at</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">StandardProblems::handmade_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">Task::syntax_tree</span><span class="plain-syntax">(), </span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_UOsMutuallyExclusive</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Problems::issue_problem_segment</span><span class="plain-syntax">(</span>
<span class="plain-syntax">        </span><span class="string-syntax">"In %1, you set a use option '%3', but that conflicts with the "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"earlier setting %2 of '%4', because these are names for two "</span>
<span class="plain-syntax">        </span><span class="string-syntax">"different possible values of the same parameter."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Problems::issue_problem_end</span><span class="plain-syntax">();</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1_6_2">&#167;1.6.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_6_2_3" class="paragraph-anchor"></a><b>&#167;1.6.2.3. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Vet the kit</span><span class="named-paragraph-number">1.6.2.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">inform_project</span><span class="plain-syntax"> *</span><span class="identifier-syntax">proj</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Task::project</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inform_kit</span><span class="plain-syntax"> *</span><span class="identifier-syntax">kit</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Projects::get_linked_kit</span><span class="plain-syntax">(</span><span class="identifier-syntax">proj</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">kit_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">kit</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">StandardProblems::handmade_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">Task::syntax_tree</span><span class="plain-syntax">(), </span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_UOForMissingKit</span><span class="plain-syntax">));</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Problems::quote_source</span><span class="plain-syntax">(1, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">where_created</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Problems::quote_stream</span><span class="plain-syntax">(2, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">kit_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Problems::issue_problem_segment</span><span class="plain-syntax">(</span>
<span class="plain-syntax">            </span><span class="string-syntax">"In %1, you set up a use option used to configure the kit '%2', "</span>
<span class="plain-syntax">            </span><span class="string-syntax">"but that kit is not part of the current project."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Problems::issue_problem_end</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">f</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Kits::configuration_is_a_flag</span><span class="plain-syntax">(</span><span class="identifier-syntax">kit</span><span class="plain-syntax">, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">symbol_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">f</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">StandardProblems::handmade_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">Task::syntax_tree</span><span class="plain-syntax">(), </span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_UONotInKit</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Problems::quote_source</span><span class="plain-syntax">(1, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">where_created</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Problems::quote_stream</span><span class="plain-syntax">(2, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">kit_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Problems::quote_stream</span><span class="plain-syntax">(3, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">symbol_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Problems::issue_problem_segment</span><span class="plain-syntax">(</span>
<span class="plain-syntax">                </span><span class="string-syntax">"In %1, you set up a use option used to configure the kit '%2' "</span>
<span class="plain-syntax">                </span><span class="string-syntax">"by setting the value of '%3', but that kit (though part of the "</span>
<span class="plain-syntax">                </span><span class="string-syntax">"current project) has no such configuration value. These are set "</span>
<span class="plain-syntax">                </span><span class="string-syntax">"for a kit in its JSON metadata file."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Problems::issue_problem_end</span><span class="plain-syntax">();</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">f</span><span class="plain-syntax"> == </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">val</span><span class="plain-syntax"> != </span><span class="constant-syntax">0</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">val</span><span class="plain-syntax"> != </span><span class="constant-syntax">1</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">StandardProblems::handmade_problem</span><span class="plain-syntax">(</span><span class="identifier-syntax">Task::syntax_tree</span><span class="plain-syntax">(), </span><span class="identifier-syntax">_p_</span><span class="plain-syntax">(</span><span class="identifier-syntax">PM_UOFlagSaysKit</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Problems::quote_source</span><span class="plain-syntax">(1, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">where_created</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Problems::quote_stream</span><span class="plain-syntax">(2, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">kit_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Problems::quote_stream</span><span class="plain-syntax">(3, </span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">symbol_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">val_signed</span><span class="plain-syntax"> = (</span><span class="reserved-syntax">int</span><span class="plain-syntax">) </span><span class="identifier-syntax">val</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Problems::quote_number</span><span class="plain-syntax">(4, &amp;</span><span class="identifier-syntax">val_signed</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Problems::issue_problem_segment</span><span class="plain-syntax">(</span>
<span class="plain-syntax">                </span><span class="string-syntax">"In %1, you set up a use option used to configure the kit '%2' "</span>
<span class="plain-syntax">                </span><span class="string-syntax">"by setting the value of '%3', but the JSON metadata for that kit "</span>
<span class="plain-syntax">                </span><span class="string-syntax">"says that %3 is a flag, and here we seem to want to set it to "</span>
<span class="plain-syntax">                </span><span class="string-syntax">"the value %4, which is clearly not 0 or 1."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Problems::issue_problem_end</span><span class="plain-syntax">();</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1_6_2">&#167;1.6.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_6_3" class="paragraph-anchor"></a><b>&#167;1.6.3. </b>Suppose `BasicInformKit` says in its metadata that it expects `SECRET_SAUCE`
to be defined, but no use option has been declared which mentions that. We don't
want linking to fail, so we declare this to be 0.
</p>

<p class="commentary">The fraudulent entries in the dictionary, which are not valid pointers, are
unimportant because the dictionary is thrown away immediately after this is done.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Default any configuration constants needed by a kit but not addressed by use options</span><span class="named-paragraph-number">1.6.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">linked_list</span><span class="plain-syntax"> *</span><span class="identifier-syntax">L</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Projects::list_of_kit_configurations</span><span class="plain-syntax">(</span><span class="identifier-syntax">Task::project</span><span class="plain-syntax">());</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">kit_configuration</span><span class="plain-syntax"> *</span><span class="identifier-syntax">kc</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">kc</span><span class="plain-syntax">, </span><span class="identifier-syntax">kit_configuration</span><span class="plain-syntax">, </span><span class="identifier-syntax">L</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">UO</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><a href="3-uo.html#SP2" class="function-link"><span class="function-syntax">RTUseOptions::uo_identifier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">kc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">owner</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">as_copy</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">edition</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">work</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">title</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">kc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">symbol_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">kc</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">is_flag</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Dictionaries::find</span><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">) == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"Kit default needed: defining %S = 0\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">use_option</span><span class="plain-syntax"> *</span><span class="identifier-syntax">hideous_fraud</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">use_option</span><span class="plain-syntax"> *) </span><span class="identifier-syntax">kc</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Dictionaries::create</span><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">Dictionaries::write_value</span><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">hideous_fraud</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="3-uo.html#SP3" class="function-link"><span class="function-syntax">RTUseOptions::define_config_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">UO</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP1_6">&#167;1.6</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>This composes constant identifiers:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">RTUseOptions::uo_identifier</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">RTUseOptions::uo_identifier</span></span>:<br/><a href="3-uo.html#SP1_6_2_1">&#167;1.6.2.1</a>, <a href="3-uo.html#SP1_6_3">&#167;1.6.3</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">kit_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">symbol_name</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">flag</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">kit_name</span><span class="plain-syntax">) &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%S`"</span><span class="plain-syntax">, </span><span class="identifier-syntax">kit_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">symbol_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"_CFG"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">flag</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"F"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"V"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>Kit configuration constants are created in the <span class="extract"><span class="extract-syntax">configuration</span></span> submodule
of the <span class="extract"><span class="extract-syntax">completion</span></span> module in the Inter tree:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">RTUseOptions::define_config_constant</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">RTUseOptions::define_config_constant</span></span>:<br/><a href="3-uo.html#SP1_5">&#167;1.5</a>, <a href="3-uo.html#SP1_6_2">&#167;1.6.2</a>, <a href="3-uo.html#SP1_6_3">&#167;1.6.3</a>, <a href="3-uo.html#SP6_1">&#167;6.1</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">val</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">package_request</span><span class="plain-syntax"> *</span><span class="identifier-syntax">R</span><span class="plain-syntax"> = </span><span class="identifier-syntax">LargeScale::completion_submodule</span><span class="plain-syntax">(</span><a href="2-emt.html#SP1" class="function-link"><span class="function-syntax">Emit::tree</span></a><span class="plain-syntax">(),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LargeScale::register_submodule_identity</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"configuration"</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">iname</span><span class="plain-syntax"> = </span><span class="identifier-syntax">InterNames::explicitly_named</span><span class="plain-syntax">(</span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">R</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="2-emt.html#SP6" class="function-link"><span class="function-syntax">Emit::numeric_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">iname</span><span class="plain-syntax">, </span><span class="identifier-syntax">val</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="2-hrr.html#SP17" class="function-link"><span class="function-syntax">Hierarchy::make_available</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">iname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>Has the use option ever been used, as opposed to simply having its meaning
declared?
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">RTUseOptions::used</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">RTUseOptions::used</span></span>:<br/><a href="3-uo.html#SP1_2_1">&#167;1.2.1</a>, <a href="3-uo.html#SP1_3">&#167;1.3</a>, <a href="3-uo.html#SP1_6">&#167;1.6</a>, <a href="3-uo.html#SP1_6_2">&#167;1.6.2</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">use_option</span><span class="plain-syntax"> *</span><span class="identifier-syntax">uo</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">uo</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">LinkedLists::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">uo</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">settings_made</span><span class="plain-syntax">) &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. </b>Logging:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">RTUseOptions::log_puos</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">RTUseOptions::log_puos</span></span>:<br/><a href="3-uo.html#SP1_2_1">&#167;1.2.1</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">parsed_use_option_setting</span><span class="plain-syntax"> *</span><span class="identifier-syntax">puos</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">puos</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) { </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"&lt;none&gt;"</span><span class="plain-syntax">); </span><span class="reserved-syntax">return</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"{%W"</span><span class="plain-syntax">, </span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">textual_option</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">at_least</span><span class="plain-syntax"> == </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">) </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">" &gt;= %d"</span><span class="plain-syntax">, </span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">value</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">at_least</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">" == %d"</span><span class="plain-syntax">, </span><span class="identifier-syntax">puos</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">value</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"}"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. Deprecated inclusion notation.</b>The old-school way for use options to take effect is by causing a constant to
be defined using inclusion notation. That is, they are defined using Inform 6
notation inside <span class="extract"><span class="extract-syntax">(-</span></span> and <span class="extract"><span class="extract-syntax">-)</span></span> markers: for example,
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">Use</span><span class="plain-syntax"> </span><span class="identifier-syntax">feverish</span><span class="plain-syntax"> </span><span class="identifier-syntax">dreams</span><span class="plain-syntax"> </span><span class="identifier-syntax">translates</span><span class="plain-syntax"> </span><span class="identifier-syntax">as</span><span class="plain-syntax"> (- </span><span class="identifier-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">FEVERISH_DREAMS</span><span class="plain-syntax">; -).</span>
<span class="identifier-syntax">Use</span><span class="plain-syntax"> </span><span class="identifier-syntax">hallucination</span><span class="plain-syntax"> </span><span class="identifier-syntax">time</span><span class="plain-syntax"> </span><span class="identifier-syntax">of</span><span class="plain-syntax"> </span><span class="identifier-syntax">at</span><span class="plain-syntax"> </span><span class="identifier-syntax">least</span><span class="plain-syntax"> </span><span class="constant-syntax">1024</span><span class="plain-syntax"> </span><span class="identifier-syntax">translates</span><span class="plain-syntax"> </span><span class="identifier-syntax">as</span>
<span class="plain-syntax">    (- </span><span class="identifier-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">DREAMY_TIME</span><span class="plain-syntax"> = {</span><span class="identifier-syntax">N</span><span class="plain-syntax">}+3; -).</span>
</pre>
<p class="commentary">The <span class="extract"><span class="extract-syntax">{N}</span></span> marker, if present, is converted to the value, producing, say:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">DREAMY_TIME</span><span class="plain-syntax"> = </span><span class="constant-syntax">4096</span><span class="plain-syntax">+3;</span>
</pre>
<p class="commentary">All this form of notation is deprecated now, but in the mean time we can still
read almost all such definitions, because almost all users write them in a simple
enough way that we can tell what they want and achieve it by better means.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">RTUseOptions::check_deprecated_definition</span><span class="plain-syntax">(</span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">UO</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-uo.html#SP6" class="function-link"><span class="function-syntax">RTUseOptions::handle_deprecated_definition</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax">  </span><span class="function-syntax">RTUseOptions::handle_deprecated_definition</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">RTUseOptions::handle_deprecated_definition</span></span>:<br/><a href="3-uo.html#SP1_6_1">&#167;1.6.1</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">active</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">N</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">val</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">identifier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">match_results</span><span class="plain-syntax"> </span><span class="identifier-syntax">mr</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Regexp::create_mr</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">" *Constant (%C+) *; *"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">identifier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0];</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">" *Constant (%C+) *= *(%d+) *; *"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">identifier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0]; </span><span class="identifier-syntax">val</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) </span><span class="identifier-syntax">Str::atoi</span><span class="plain-syntax">(</span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1], </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">" *Constant (%C+) *= *{N} *; *"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">identifier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0]; </span><span class="identifier-syntax">val</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) </span><span class="identifier-syntax">N</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">" *Constant (%C+) *= *{N} *%+ *(%d+) *; *"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">identifier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0];</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">val</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) (</span><span class="identifier-syntax">N</span><span class="plain-syntax"> + </span><span class="identifier-syntax">Str::atoi</span><span class="plain-syntax">(</span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1], </span><span class="constant-syntax">0</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">" *Constant (%C+) *= *{N} *%* *(%d+) *; *"</span><span class="plain-syntax">)) ||</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">" *Constant (%C+) *= *(%d+) *%* *{N} *; *"</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">identifier</span><span class="plain-syntax"> = </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0];</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">val</span><span class="plain-syntax"> = (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax">) (</span><span class="identifier-syntax">N</span><span class="plain-syntax"> * </span><span class="identifier-syntax">Str::atoi</span><span class="plain-syntax">(</span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1], </span><span class="constant-syntax">0</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">identifier</span><span class="plain-syntax">) &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="3-uo.html#SP6_1" class="named-paragraph-link"><span class="named-paragraph">Declare a constant, in a civilised way</span><span class="named-paragraph-number">6.1</span></a></span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">rv</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6_1" class="paragraph-anchor"></a><b>&#167;6.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Declare a constant, in a civilised way</span><span class="named-paragraph-number">6.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">active</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"not "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">USE_OPTIONS</span><span class="plain-syntax">, </span><span class="string-syntax">"deducing %S = %d from (- %S -).\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">identifier</span><span class="plain-syntax">, </span><span class="identifier-syntax">val</span><span class="plain-syntax">, </span><span class="identifier-syntax">UO</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">active</span><span class="plain-syntax">) </span><a href="3-uo.html#SP3" class="function-link"><span class="function-syntax">RTUseOptions::define_config_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">identifier</span><span class="plain-syntax">, </span><span class="identifier-syntax">val</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-uo.html#SP6">&#167;6</a>.</li></ul>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="3-cm.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-rm.html">1</a></li><li class="progresschapter"><a href="2-hrr.html">2</a></li><li class="progresscurrentchapter">3</li><li class="progresssection"><a href="3-gm.html">gm</a></li><li class="progresssection"><a href="3-cm.html">cm</a></li><li class="progresscurrent">uo</li><li class="progresschapter"><a href="4-enc.html">4</a></li><li class="progresschapter"><a href="5-act.html">5</a></li><li class="progresschapter"><a href="6-bd.html">6</a></li><li class="progresschapter"><a href="7-cg.html">7</a></li><li class="progressnext"><a href="4-enc.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

